package com.example.springboot.mapper;

import com.example.springboot.controller.request.BaseRequest;
import com.example.springboot.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Description:mapper接口注解实现方式
 *
 * @Author 马钰涵
 * @Create 2023/8/5 9:10
 * @Version 1.0
 */
@Mapper
public interface BookMapper {

    List<Book> list();

    List<Book> listByCondition(BaseRequest baseRequest);

    void save(Book book);

    Book getById(Integer id);

    void updateById(Book book);

    void deleteById(Integer id);

    Book getByBookNo(String userNo);

    void updateNumberByNo(String bookNo);

    void deleteBatch(@Param("ids") List<Integer> ids);
}
